package com.logic.landseaserver.domain;

import java.sql.Timestamp;
import java.util.Date;

import com.logic.landseaserver.ws.dto.RealBillDTO;

public class RealBillBalanceRecord extends RealBillDTO
{
    private static final long serialVersionUID = -4379600251634255509L;
    
    private Integer bsId;
    
    private Integer bsBillId;
    
    private String bsBillType;
    
    private Integer bsProjectId;
    
    private Integer bsContractId;
    
    private String bsContractNo;
    
    private String bsBillNo;
    
    private Integer bsRoomId;
    
    private String bsHouseNum;
    
    private String bsBillMonth;
    
    private String bsExpenditure;
    
    private String bsExpenditureCode;
    
    private Date bsStartTime;
    
    private Date bsEndTime;
    
    private Double bsReceivableMoney;
    
    private Double bsAmountReceived;
    
    private String bsBillStatus;
    
    private Date bsPayTime;
    
    private Date bsCreateTime;
    
    private Integer bsProduceType;
    
    private String bsMark;
    
    private Date bsLastModifiedDtm;
    
    private Integer bsLastModifiedBy;
    
    private Integer bsVersion;
    
    private Boolean bsDeleted;
    
    public Integer getBsId()
    {
        return bsId;
    }
    
    public void setBsId(Integer bsId)
    {
        this.bsId = bsId;
    }
    
    public Integer getBsBillId()
    {
        return bsBillId;
    }
    
    public void setBsBillId(Integer bsBillId)
    {
        this.bsBillId = bsBillId;
    }
    
    public String getBsBillType()
    {
        return bsBillType;
    }
    
    public void setBsBillType(String bsBillType)
    {
        this.bsBillType = bsBillType;
    }
    
    public Integer getBsProjectId()
    {
        return bsProjectId;
    }
    
    public void setBsProjectId(Integer bsProjectId)
    {
        this.bsProjectId = bsProjectId;
    }
    
    public Integer getBsContractId()
    {
        return bsContractId;
    }
    
    public void setBsContractId(Integer bsContractId)
    {
        this.bsContractId = bsContractId;
    }
    
    public String getBsContractNo()
    {
        return bsContractNo;
    }
    
    public void setBsContractNo(String bsContractNo)
    {
        this.bsContractNo = bsContractNo;
    }
    
    public String getBsBillNo()
    {
        return bsBillNo;
    }
    
    public void setBsBillNo(String bsBillNo)
    {
        this.bsBillNo = bsBillNo;
    }
    
    public Integer getBsRoomId()
    {
        return bsRoomId;
    }
    
    public void setBsRoomId(Integer bsRoomId)
    {
        this.bsRoomId = bsRoomId;
    }
    
    public String getBsHouseNum()
    {
        return bsHouseNum;
    }
    
    public void setBsHouseNum(String bsHouseNum)
    {
        this.bsHouseNum = bsHouseNum;
    }
    
    public String getBsBillMonth()
    {
        return bsBillMonth;
    }
    
    public void setBsBillMonth(String bsBillMonth)
    {
        this.bsBillMonth = bsBillMonth;
    }
    
    public String getBsExpenditure()
    {
        return bsExpenditure;
    }
    
    public void setBsExpenditure(String bsExpenditure)
    {
        this.bsExpenditure = bsExpenditure;
    }
    
    public String getBsExpenditureCode()
    {
        return bsExpenditureCode;
    }
    
    public void setBsExpenditureCode(String bsExpenditureCode)
    {
        this.bsExpenditureCode = bsExpenditureCode;
    }
    
    public Date getBsStartTime()
    {
        return bsStartTime;
    }
    
    public void setBsStartTime(Date bsStartTime)
    {
        this.bsStartTime = bsStartTime;
    }
    
    public Date getBsEndTime()
    {
        return bsEndTime;
    }
    
    public void setBsEndTime(Date bsEndTime)
    {
        this.bsEndTime = bsEndTime;
    }
    
    public Double getBsReceivableMoney()
    {
        return bsReceivableMoney;
    }
    
    public void setBsReceivableMoney(Double bsReceivableMoney)
    {
        this.bsReceivableMoney = bsReceivableMoney;
    }
    
    public Double getBsAmountReceived()
    {
        return bsAmountReceived;
    }
    
    public void setBsAmountReceived(Double bsAmountReceived)
    {
        this.bsAmountReceived = bsAmountReceived;
    }
    
    public String getBsBillStatus()
    {
        return bsBillStatus;
    }
    
    public void setBsBillStatus(String bsBillStatus)
    {
        this.bsBillStatus = bsBillStatus;
    }
    
    public Date getBsPayTime()
    {
        return bsPayTime;
    }
    
    public void setBsPayTime(Date bsPayTime)
    {
        this.bsPayTime = bsPayTime;
    }
    
    public Date getBsCreateTime()
    {
        return bsCreateTime;
    }
    
    public void setBsCreateTime(Date bsCreateTime)
    {
        this.bsCreateTime = bsCreateTime;
    }
    
    public Integer getBsProduceType()
    {
        return bsProduceType;
    }
    
    public void setBsProduceType(Integer bsProduceType)
    {
        this.bsProduceType = bsProduceType;
    }
    
    public String getBsMark()
    {
        return bsMark;
    }
    
    public void setBsMark(String bsMark)
    {
        this.bsMark = bsMark;
    }
    
    public Date getBsLastModifiedDtm()
    {
        return bsLastModifiedDtm;
    }
    
    public void setBsLastModifiedDtm(Date bsLastModifiedDtm)
    {
        this.bsLastModifiedDtm = bsLastModifiedDtm;
    }
    
    public Integer getBsLastModifiedBy()
    {
        return bsLastModifiedBy;
    }
    
    public void setBsLastModifiedBy(Integer bsLastModifiedBy)
    {
        this.bsLastModifiedBy = bsLastModifiedBy;
    }
    
    public Integer getBsVersion()
    {
        return bsVersion;
    }
    
    public void setBsVersion(Integer bsVersion)
    {
        this.bsVersion = bsVersion;
    }
    
    public Boolean getBsDeleted()
    {
        return bsDeleted;
    }
    
    public void setBsDeleted(Boolean bsDeleted)
    {
        this.bsDeleted = bsDeleted;
    }
    
    public RealBillDTO buildRealBillDTO()
    {
        RealBillDTO rb = new RealBillDTO();
        rb.setId(getId());
        rb.setBillMonth(getBillMonth());
        rb.setBillNo(getBillNo());
        rb.setBillPrice(getBillPrice());
        rb.setBillPaymentList(getBillPaymentList());
        rb.setBillType(getBillType());
        rb.setComment(getComment());
        rb.setConsumption(getConsumption());
        rb.setContractId(getContractId());
        rb.setCreatedBy(getCreatedBy());
        rb.setCreatedByName(getCreatedByName());
        rb.setCreatedDtm(getCreatedDtm());
        rb.setDeleted(getDeleted());
        rb.setExpenseType(getExpenseType());
        rb.setExpenseTypeDesc(getExpenseTypeDesc());
        rb.setInputType(getInputType());
        rb.setLastModifiedBy(getLastModifiedBy());
        rb.setLastModifiedByName(getLastModifiedByName());
        rb.setLastModifiedDtm(getLastModifiedDtm());
        rb.setRoomId(getRoomId());
        rb.setStatus(getStatus());
        rb.setStatusDesc(getStatusDesc());
        rb.setVersion(getVersion());
        return rb;
    }
    
    public RealBillDTO buildRealBillDTOFromBalance()
    {
        RealBillDTO realBillBalance = new RealBillDTO();
        realBillBalance = new RealBillDTO();
        realBillBalance.setBillMonth(getBsBillMonth());
        realBillBalance.setBillNo(getBsBillNo());
        realBillBalance.setBillPrice(getBsReceivableMoney());
        realBillBalance.setComment(getBsMark());
        realBillBalance.setContractId(getBsContractId());
        if (null != getBsCreateTime())
        {
            Timestamp tst = new Timestamp(getBsCreateTime().getTime());
            realBillBalance.setCreatedDtm(tst);
        }
        realBillBalance.setExpenseType(getBsExpenditureCode());
        realBillBalance.setExpenseTypeDesc(getBsExpenditure());
        realBillBalance.setLastModifiedBy(getBsLastModifiedBy());
        realBillBalance.setRoomId(getBsRoomId());
        realBillBalance.setStatus(getBsBillStatus());
        return realBillBalance;
    }
}
